$def with (work, edition)

$ book_title = edition.get('title', '') or (work.title if work else '')

<h1 class="work-title" itemprop="name">$book_title</h1>

$if edition:
  $if edition.subtitle:
    <h2 class="work-subtitle">
      $edition.subtitle
    </h2>
  $if edition.edition_name:
    <div class="work-line">
      $edition.edition_name
    </div>
